<?php

/**
 * @copyright   FOSP
 * @version     20120412
 * @todo        Factory to object access player table
 * @name        Fpt_Business_Player
 * @author      QuangTM 
 */
class Fpt_Business_Player
{

    protected function __construct()
    {
        
    }


    protected function __clone()
    {
        
    }


    /**
     * Factory to object access player table
     * @param array $options
     * @return Fpt_Business_Player_Adapter_Abstract
     */
    static public function factory(array $options)
    {
        $className = $options['adapter'];

        if (empty($className))
            return Fpt_Server::setOutputData(-1, 'empty class name', null);

        $className = __CLASS__ . '_Adapter_' . ucfirst(strtolower($className));

        return call_user_func(array($className, 'getInstance'));
    }

}